<div class="admin edit goods">

	<a class="btn add" href="<?php $params = array(); if($categoryId > 0) {$params['categoryId'] = $categoryId;} echo $this->createUrl('/admin/pages/editor/', $params); ?>">Добавить страницу</a>

    <h1>Редактор страницы</h1>

	<div class="clear"></div>

	<form action="" method="post">
		<?php if($oRow && $oRow->id > 0): ?>
			<input type="hidden" name="id" value="<?php echo $oRow->id; ?>" />
		<?php endif; ?>

		<div class="item">
			<label>Категория</label>
			<?php echo $this->widget('ext.fields.TreeCategories', array('selectId' => ($categoryId ? $categoryId : $oRow->category_id))); ?>
		</div>

		<div class="clear"></div>

		<div class="item">
			<label>Тип страницы</label>
			<label class="radio"><input type="radio" name="type" value="page" <?php echo $oRow->type == 'page' || $oRow->type == '' ? ' checked' : ''; ?> /> <span>текстовая страница</span></label>
			<label class="radio"><input type="radio" name="type" value="size" <?php echo $oRow->type == 'size' ? ' checked' : ''; ?> /> <span>размеры</span></label>
		</div>

		<div class="item">
			<label>Назва</label>
			<input type="text" name="title" value="<?php echo !empty($oRow->title) ? $oRow->title : ''; ?>" />
		</div>

		<div class="item">
			<label>Alias</label>
			<input type="text" name="alias" value="<?php echo !empty($oRow->alias) ? $oRow->alias : ''; ?>" />
		</div>


		<div class="item">
			<label>Описание</label>
			<textarea class="editor" name="description"><?php echo !empty($oRow->description) ? $oRow->description : ''; ?></textarea>
		</div>

		<div class="item">
			<label>Meta keywords</label>
			<input type="text" name="meta_keywords" value="<?php echo !empty($oRow->meta_keywords) ? $oRow->meta_keywords : ''; ?>" />
		</div>

		<div class="item">
			<label>Meta description</label>
			<input type="text" name="meta_description" value="<?php echo !empty($oRow->meta_description) ? $oRow->meta_description : ''; ?>" />
		</div>

		<div class="item">
			<label>Сортировка</label>
			<input type="text" name="sort" value="<?php echo !empty($oRow->sort) ? $oRow->sort : '0'; ?>" />
		</div>

		<div class="clear"></div>

		<div class="item">
			<label>Фотографии</label>
			<?php echo $this->widget('ext.fields.UploadImages', array('oRow' => $oRow)); ?>
		</div>

		<div class="clear"></div>

        <div class="item btn">
            <button type="submit"><span>Зберегти</span></button>
        </div>
    </form>
</div>